<?php

namespace app\admin\validate\diy;

use tmcore\base\BaseValidate;

class DiyValidate extends BaseValidate
{
    protected $rule = [
        'type' => 'require',
        'data' => 'require',
    ];

    protected $message = [
        'type.require' => '类型不可为空',
        'data.require' => '数据不可为空',
    ];

    /**
     * 设置场景
     * @return DiyValidate
     */
    public function sceneSet()
    {
        return $this->only(['type','data']);
    }

    /**
     * 获取场景
     * @return DiyValidate
     */
    public function sceneGet()
    {
        return $this->only(['type']);
    }
}